/*
 *  fullbody.cpp
 *  bgsubtraction
 *
 *  Created by a1gucis on 4/23/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */

#include "fullbody.h"

FullBody::FullBody():BodyPart(NUMBER_OF_CLUSTERS) {
	this->mopCloseIterations = MOP_FULL_BODY_ITERATIONS;
}

int FullBody::getArea() {
	int area = 0;
	uchar *data = (uchar *)labeledImage->imageData;
	for (int i=0;i<labeledImage->height;i++) {
		for (int j=0;j<labeledImage->width;j++) {
			if (data[i*labeledImage->widthStep+j*labeledImage->nChannels] != bgLabel)
				area++;
		}
	}
	return area;
}